import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询分类列表
export function listClassify(query) {
  // debugger
  return request({
    url: '/article/classify/list',
    method: 'get',
    params: query
  });
}

// 查询文章列表（排除节点）
export function listClassifyExcludeChild(classifyId) {
  return request({
    url: '/article/classify/list/exclude/' + classifyId,
    method: 'get'
  })
}

//查询分类
export function getClassify(classifyId) {
  return request({
    url: '/article/classify/' + parseStrEmpty(classifyId),
    method: 'get'
  });
}


// 新增分类
export function addClassify(data) {
  return request({
    url: '/article/classify',
    method: 'post',
    data: data
  });
}



// 修改分类
export function updateClassify(data) {
  return request({
    url: '/article/classify',
    method: 'put',
    data: data
  });
}

// 删除分类
export function delClassify(classifyId) {
  return request({
    url: '/article/classify/' + classifyId,
    method: 'delete'
  });
}

